#include <iostream>
#include "bigint.h"
#include "bigintptr.h"
using namespace std;

int main()
{
	BigInt num1;
	BigInt num2;
	BigInt ans;
	string s;
	cin >> s;
	StrToBigInt(s, num1);
	cout << BigIntToStr(num1) << endl;
	cin >> s;
	StrToBigInt(s, num2);
	cout << BigIntToStr(num2) << endl;
	Sub(num1, num2, ans);
	cout << BigIntToStr( ans ) << endl;
	return 0;	
}